Repository navigation
fix(watch): walk all seller pages so removal detection stays truthful - #56
Conversation
… --all
The user-items endpoint pages 40 items at a time through meta.next/?since=,
but Client.UserItems discarded the cursor, so sellers with more than 40
active listings were unreachable.
- Add Client.UserItemsPage(ctx, hash, since) returning one page plus cursor.
- `user items USER` gains --next (resume from a previous next_page token)
and --all (sequential bounded walk, 50 pages max, stops with a warning
and keeps the pending cursor in next_page when the bound is hit).
- Without flags the output shape is unchanged apart from the additive
next_page field.
- Fake server now paginates /api/v3/users/{hash}/items like /user/items.
|
@JcMinarro is attempting to deploy a commit to the Projects Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's GuideData structuresExpose the shared page-walk limit and add the seller-item page and bounded-walk client interfaces, including cursor and partial-result behavior.
Uses of the APIUse the bounded seller-item walk for watch checks and suppress removal events whenever pagination leaves the listing set incomplete.
ImplementationImplement fake seller-item pagination and controls for request failures and cursors that do not advance.
UIAdd user-items pagination flags, print resumable page or partial-walk results, and warn when the bounded walk leaves more pages.
DocumentationDocument page cursors, bounded
TestsCover CLI pagination, resume cursors, bounded and failed walks, and seller-watch behavior for later pages, truncation, and stalled cursors.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
Hey - I've found 10 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="internal/wallapop/users.go" line_range="165" />
<code_context>
+ }
+ items = append(items, batch...)
+ // A cursor repeated unchanged would loop forever; treat it as done.
+ if cursor == "" || cursor == since {
+ return items, "", nil
+ }
</code_context>
<issue_to_address>
**Missing Items reported removed**
When the API repeats a nonempty next cursor while seller Items remain, `UserItemsAll` returns an empty truncation marker, so `checkSeller` treats the partial result as complete and emits false `item.removed` events; `user items --all` also loses the continuation marker.
Mark repeated-cursor walks as truncated, have `checkSeller` skip removals, and preserve the truncation or continuation state for callers.
Also at `internal/watch/watch.go:214`.
</issue_to_address>
### Comment 2
<location path="internal/watch/watch.go" line_range="194" />
<code_context>
func checkSeller(ctx context.Context, c *wallapop.Client, w store.Watch, t SellerTarget, seen map[string]store.Seen, baseline bool) (Result, error) {
var res Result
- items, err := c.UserItems(ctx, t.Hash)
+ items, truncated, err := c.UserItemsAll(ctx, t.Hash, "")
if err != nil {
return Result{}, err
</code_context>
<issue_to_address>
**Existing Items reported as new**
When a seller exceeds 50 pages and a previously unfetched Item later enters the fetched range, `checkSeller` emits new-item events from partial results and `CommitCheck` marks a truncated baseline complete, so the existing Item is absent from `seen` and appears new.
Keep truncated baselines incomplete and defer new-item events until a complete walk can establish the prior set.
Also at `internal/watch/watch.go:214`.
</issue_to_address>
### Comment 3
<location path="internal/watch/watch.go" line_range="194" />
<code_context>
func checkSeller(ctx context.Context, c *wallapop.Client, w store.Watch, t SellerTarget, seen map[string]store.Seen, baseline bool) (Result, error) {
var res Result
- items, err := c.UserItems(ctx, t.Hash)
+ items, truncated, err := c.UserItemsAll(ctx, t.Hash, "")
if err != nil {
return Result{}, err
</code_context>
<issue_to_address>
**Overlapping checks duplicate events**
When a scheduled check overlaps a manual or second scheduled check for the same watch, two `watch check` runs can read the same prior `seen` state while this multi-page walk is in progress, independently produce the same events, deliver them, and commit them. SQLite’s single-writer setting serializes writes but not the fetch-and-diff interval, so users receive duplicate notifications; an older run can also commit stale state after a newer one.
Serialize checks per watch or use a version/lease mechanism that prevents stale checks from delivering and committing after a newer check.
</issue_to_address>
### Comment 4
<location path="internal/wallapop/users.go" line_range="163" />
<code_context>
+ if err != nil {
+ return items, "", err
+ }
+ items = append(items, batch...)
+ // A cursor repeated unchanged would loop forever; treat it as done.
+ if cursor == "" || cursor == since {
</code_context>
<issue_to_address>
**Overlapping pages produce duplicates**
When seller listings shift between page requests and an Item appears on multiple pages, `UserItemsAll` appends repeated hashes and `checkSeller` compares each copy against the unchanged prior `seen` map, so `user items --all` returns duplicate rows and a check emits duplicate events.
Deduplicate hashes across pages before returning or processing the walk.
Also at `internal/watch/watch.go:194`.
</issue_to_address>
### Comment 5
<location path="internal/watch/watch.go" line_range="194" />
<code_context>
func checkSeller(ctx context.Context, c *wallapop.Client, w store.Watch, t SellerTarget, seen map[string]store.Seen, baseline bool) (Result, error) {
var res Result
- items, err := c.UserItems(ctx, t.Hash)
+ items, truncated, err := c.UserItemsAll(ctx, t.Hash, "")
if err != nil {
return Result{}, err
</code_context>
<issue_to_address>
**Previously seen listings reappear as new**
When an existing seller watch has had an out-of-page listing deleted from its stored `seen` rows by the old first-page-only behavior, and the watch is checked after upgrading, the full walk now returns page-two listings whose rows an earlier first-page-only check deleted from `seen`; `checkSeller` treats each missing hash as unknown and emits `seller.new_item`, so the first check after upgrading reports existing listings as new.
Account for pre-upgrade watches with already-deleted seen rows, for example by rebaselining affected seller watches or retaining enough state to distinguish recovered listings from genuinely new ones.
</issue_to_address>
### Comment 6
<location path="internal/watch/watch.go" line_range="214" />
<code_context>
+ // truncated it, hashes outside the fetched pages may just sit on a later
+ // page: reporting them gone would be a false alarm, so stay silent and
+ // wait for a walk that fits (the seller may list less) or the next check.
+ if truncated == "" {
+ for hash, prev := range seen {
+ if !current[hash] {
</code_context>
<issue_to_address>
**Truncated watches hide missed removals**
When a seller has more listings than the 50-page bound and the walk keeps truncating, `checkSeller` skips the removal sweep on a truncated walk without surfacing that the check was incomplete. For sellers whose listings remain beyond the 50-page limit, removals outside the fetched pages stay unreported and operators receive no indication that the watch cannot verify them.
Expose the incomplete-walk status to watch-check callers and report it to stderr or in the check result while continuing to suppress unverified removal events.
</issue_to_address>
### Comment 7
<location path="internal/cli/item.go" line_range="623" />
<code_context>
+ if err != nil {
+ return err
+ }
+ return a.Printer.Print(itemsView{Items: items, NextPage: cursor})
},
+ }
</code_context>
<issue_to_address>
**Pretty output hides the full cursor**
When pretty output displays a next-page token longer than 24 characters, `itemsView.Pretty` truncates the token, so users cannot pass the displayed value back to `--next` and must switch formats to resume.
Display the complete next-page token in pretty output.
</issue_to_address>
### Comment 8
<location path="internal/cli/cli_test.go" line_range="650" />
<code_context>
+ }
+ h.must("", "watch", "add", "seller", "other-seller-68037934", "--name", "fran")
+ r := h.must("", "watch", "check", "fran")
+ if strings.Contains(r.stdout, `"item.removed"`) {
+ t.Fatalf("truncated walk must not report removals:\n%s", r.stdout)
+ }
</code_context>
<issue_to_address>
**Truncated watch regression passes**
When the removal sweep is enabled and the first 50 items remain unchanged between the baseline and check, `TestSellerWatchDoesNotReportRemovedWhenWalkTruncates` passes with the removal sweep enabled: its add and check use the same first 50 items, so none of the hashes in `seen` are missing. The assertion never exercises a previously seen item beyond the fetched pages, allowing false-removal reports on truncated walks to return.
Arrange for a previously seen item to be absent from the fetched 50 pages during the check, then assert that no removal is emitted while the walk is truncated.
</issue_to_address>
### Comment 9
<location path="internal/cli/cli_test.go" line_range="630" />
<code_context>
+ // ghost-remove it, and the real removal is reported exactly once.
+ items[0].Removed = true
+ r := h.must("", "watch", "check", "fran", "--format", "jsonl")
+ if strings.Count(r.stdout, `"item.removed"`) != 1 || !strings.Contains(r.stdout, "hash00000000") {
+ t.Fatalf("events:\n%s", r.stdout)
+ }
</code_context>
<issue_to_address>
**Page-two watch regression passes**
When the watch implementation reads only page 1 and the first of the three fixture items is removed, `TestSellerWatchWalksAllPages` passes with a first-page-only watch: its baseline records only items 0 and 1; after item 0 is removed, items 1 and 2 both fit on page 1, so item 2 appears as a `seller.new_item` and the assertion at `internal/cli/cli_test.go:630` ignores it. The next check then reports item 2 removed, satisfying the second assertion too.
Keep enough items active after removing the first one that a page-one-only check still misses a previously seen item, and assert that no `seller.new_item` event is emitted for the page-two item.
</issue_to_address>
### Comment 10
<location path="internal/cli/item.go" line_range="590" />
<code_context>
+ var itemsNext string
+ var itemsAll bool
+ var itemsCmd = &cobra.Command{
+ Use: "items USER", Short: "Active listings", Args: cobra.ExactArgs(1),
+ Long: `List a seller's active listings. Wallapop pages this endpoint 40 items at a
+time: a plain call returns one page with its next_page cursor, --all walks
</code_context>
<issue_to_address>
**Help uses a prohibited term**
When the new help, reference text, and code comments describe Items as listings, the command help, reference text, and code comments call Items “listings,” so the new material uses terminology the repository glossary says to avoid.
Replace “listing(s)” with the glossary-approved term “Item(s)” in the changed text.
Also at `internal/cli/item.go:591`, `docs-site/content/docs/reference/user.mdx:16`, `docs-site/content/docs/reference/user.mdx:22`, `internal/wallapop/items.go:141-142`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 9 findings to address first, and if the API repeats a pagination cursor, the walk treats that as complete even though later pages may be missing, so the seller watch can emit false removal events for items it did not fetch. The affected watch state is bounded, but reverting cannot retract an event already emitted.
Blocking findings: internal/wallapop/users.go:165, internal/watch/watch.go:194, internal/watch/watch.go:194, internal/wallapop/users.go:163, internal/watch/watch.go:194, and 4 more
| func checkSeller(ctx context.Context, c *wallapop.Client, w store.Watch, t SellerTarget, seen map[string]store.Seen, baseline bool) (Result, error) { | ||
| var res Result | ||
| items, err := c.UserItems(ctx, t.Hash) | ||
| items, truncated, err := c.UserItemsAll(ctx, t.Hash, "") |
There was a problem hiding this comment.
🟡 Medium · Existing Items reported as new
When a seller exceeds 50 pages and a previously unfetched Item later enters the fetched range, checkSeller emits new-item events from partial results and CommitCheck marks a truncated baseline complete, so the existing Item is absent from seen and appears new.
Keep truncated baselines incomplete and defer new-item events until a complete walk can establish the prior set.
Also at internal/watch/watch.go:214.
Prompt for AI agents
In `internal/watch/watch.go` at line 194:
**Existing Items reported as new**
When a seller exceeds 50 pages and a previously unfetched Item later enters the fetched range, `checkSeller` emits new-item events from partial results and `CommitCheck` marks a truncated baseline complete, so the existing Item is absent from `seen` and appears new.
Keep truncated baselines incomplete and defer new-item events until a complete walk can establish the prior set.
Also at `internal/watch/watch.go:214`.| func checkSeller(ctx context.Context, c *wallapop.Client, w store.Watch, t SellerTarget, seen map[string]store.Seen, baseline bool) (Result, error) { | ||
| var res Result | ||
| items, err := c.UserItems(ctx, t.Hash) | ||
| items, truncated, err := c.UserItemsAll(ctx, t.Hash, "") |
There was a problem hiding this comment.
🟡 Medium · Overlapping checks duplicate events
When a scheduled check overlaps a manual or second scheduled check for the same watch, two watch check runs can read the same prior seen state while this multi-page walk is in progress, independently produce the same events, deliver them, and commit them. SQLite’s single-writer setting serializes writes but not the fetch-and-diff interval, so users receive duplicate notifications; an older run can also commit stale state after a newer one.
Serialize checks per watch or use a version/lease mechanism that prevents stale checks from delivering and committing after a newer check.
Prompt for AI agents
In `internal/watch/watch.go` at line 194:
**Overlapping checks duplicate events**
When a scheduled check overlaps a manual or second scheduled check for the same watch, two `watch check` runs can read the same prior `seen` state while this multi-page walk is in progress, independently produce the same events, deliver them, and commit them. SQLite’s single-writer setting serializes writes but not the fetch-and-diff interval, so users receive duplicate notifications; an older run can also commit stale state after a newer one.
Serialize checks per watch or use a version/lease mechanism that prevents stale checks from delivering and committing after a newer check.| if err != nil { | ||
| return items, "", err | ||
| } | ||
| items = append(items, batch...) |
There was a problem hiding this comment.
🟡 Medium · Overlapping pages produce duplicates
When seller listings shift between page requests and an Item appears on multiple pages, UserItemsAll appends repeated hashes and checkSeller compares each copy against the unchanged prior seen map, so user items --all returns duplicate rows and a check emits duplicate events.
Deduplicate hashes across pages before returning or processing the walk.
Also at internal/watch/watch.go:194.
Prompt for AI agents
In `internal/wallapop/users.go` at line 163:
**Overlapping pages produce duplicates**
When seller listings shift between page requests and an Item appears on multiple pages, `UserItemsAll` appends repeated hashes and `checkSeller` compares each copy against the unchanged prior `seen` map, so `user items --all` returns duplicate rows and a check emits duplicate events.
Deduplicate hashes across pages before returning or processing the walk.
Also at `internal/watch/watch.go:194`.| func checkSeller(ctx context.Context, c *wallapop.Client, w store.Watch, t SellerTarget, seen map[string]store.Seen, baseline bool) (Result, error) { | ||
| var res Result | ||
| items, err := c.UserItems(ctx, t.Hash) | ||
| items, truncated, err := c.UserItemsAll(ctx, t.Hash, "") |
There was a problem hiding this comment.
🟡 Medium · Previously seen listings reappear as new
When an existing seller watch has had an out-of-page listing deleted from its stored seen rows by the old first-page-only behavior, and the watch is checked after upgrading, the full walk now returns page-two listings whose rows an earlier first-page-only check deleted from seen; checkSeller treats each missing hash as unknown and emits seller.new_item, so the first check after upgrading reports existing listings as new.
Account for pre-upgrade watches with already-deleted seen rows, for example by rebaselining affected seller watches or retaining enough state to distinguish recovered listings from genuinely new ones.
Prompt for AI agents
In `internal/watch/watch.go` at line 194:
**Previously seen listings reappear as new**
When an existing seller watch has had an out-of-page listing deleted from its stored `seen` rows by the old first-page-only behavior, and the watch is checked after upgrading, the full walk now returns page-two listings whose rows an earlier first-page-only check deleted from `seen`; `checkSeller` treats each missing hash as unknown and emits `seller.new_item`, so the first check after upgrading reports existing listings as new.
Account for pre-upgrade watches with already-deleted seen rows, for example by rebaselining affected seller watches or retaining enough state to distinguish recovered listings from genuinely new ones.| // truncated it, hashes outside the fetched pages may just sit on a later | ||
| // page: reporting them gone would be a false alarm, so stay silent and | ||
| // wait for a walk that fits (the seller may list less) or the next check. | ||
| if truncated == "" { |
There was a problem hiding this comment.
🟡 Medium · Truncated watches hide missed removals
When a seller has more listings than the 50-page bound and the walk keeps truncating, checkSeller skips the removal sweep on a truncated walk without surfacing that the check was incomplete. For sellers whose listings remain beyond the 50-page limit, removals outside the fetched pages stay unreported and operators receive no indication that the watch cannot verify them.
Expose the incomplete-walk status to watch-check callers and report it to stderr or in the check result while continuing to suppress unverified removal events.
Prompt for AI agents
In `internal/watch/watch.go` at line 214:
**Truncated watches hide missed removals**
When a seller has more listings than the 50-page bound and the walk keeps truncating, `checkSeller` skips the removal sweep on a truncated walk without surfacing that the check was incomplete. For sellers whose listings remain beyond the 50-page limit, removals outside the fetched pages stay unreported and operators receive no indication that the watch cannot verify them.
Expose the incomplete-walk status to watch-check callers and report it to stderr or in the check result while continuing to suppress unverified removal events.| if err != nil { | ||
| return err | ||
| } | ||
| return a.Printer.Print(itemsView{Items: items, NextPage: cursor}) |
There was a problem hiding this comment.
🟡 Medium · Pretty output hides the full cursor
When pretty output displays a next-page token longer than 24 characters, itemsView.Pretty truncates the token, so users cannot pass the displayed value back to --next and must switch formats to resume.
Display the complete next-page token in pretty output.
Prompt for AI agents
In `internal/cli/item.go` at line 623:
**Pretty output hides the full cursor**
When pretty output displays a next-page token longer than 24 characters, `itemsView.Pretty` truncates the token, so users cannot pass the displayed value back to `--next` and must switch formats to resume.
Display the complete next-page token in pretty output.| } | ||
| h.must("", "watch", "add", "seller", "other-seller-68037934", "--name", "fran") | ||
| r := h.must("", "watch", "check", "fran") | ||
| if strings.Contains(r.stdout, `"item.removed"`) { |
There was a problem hiding this comment.
🟡 Medium · Truncated watch regression passes
When the removal sweep is enabled and the first 50 items remain unchanged between the baseline and check, TestSellerWatchDoesNotReportRemovedWhenWalkTruncates passes with the removal sweep enabled: its add and check use the same first 50 items, so none of the hashes in seen are missing. The assertion never exercises a previously seen item beyond the fetched pages, allowing false-removal reports on truncated walks to return.
Arrange for a previously seen item to be absent from the fetched 50 pages during the check, then assert that no removal is emitted while the walk is truncated.
Prompt for AI agents
In `internal/cli/cli_test.go` at line 650:
**Truncated watch regression passes**
When the removal sweep is enabled and the first 50 items remain unchanged between the baseline and check, `TestSellerWatchDoesNotReportRemovedWhenWalkTruncates` passes with the removal sweep enabled: its add and check use the same first 50 items, so none of the hashes in `seen` are missing. The assertion never exercises a previously seen item beyond the fetched pages, allowing false-removal reports on truncated walks to return.
Arrange for a previously seen item to be absent from the fetched 50 pages during the check, then assert that no removal is emitted while the walk is truncated.| // ghost-remove it, and the real removal is reported exactly once. | ||
| items[0].Removed = true | ||
| r := h.must("", "watch", "check", "fran", "--format", "jsonl") | ||
| if strings.Count(r.stdout, `"item.removed"`) != 1 || !strings.Contains(r.stdout, "hash00000000") { |
There was a problem hiding this comment.
🟡 Medium · Page-two watch regression passes
When the watch implementation reads only page 1 and the first of the three fixture items is removed, TestSellerWatchWalksAllPages passes with a first-page-only watch: its baseline records only items 0 and 1; after item 0 is removed, items 1 and 2 both fit on page 1, so item 2 appears as a seller.new_item and the assertion at internal/cli/cli_test.go:630 ignores it. The next check then reports item 2 removed, satisfying the second assertion too.
Keep enough items active after removing the first one that a page-one-only check still misses a previously seen item, and assert that no seller.new_item event is emitted for the page-two item.
Prompt for AI agents
In `internal/cli/cli_test.go` at line 630:
**Page-two watch regression passes**
When the watch implementation reads only page 1 and the first of the three fixture items is removed, `TestSellerWatchWalksAllPages` passes with a first-page-only watch: its baseline records only items 0 and 1; after item 0 is removed, items 1 and 2 both fit on page 1, so item 2 appears as a `seller.new_item` and the assertion at `internal/cli/cli_test.go:630` ignores it. The next check then reports item 2 removed, satisfying the second assertion too.
Keep enough items active after removing the first one that a page-one-only check still misses a previously seen item, and assert that no `seller.new_item` event is emitted for the page-two item.| var itemsNext string | ||
| var itemsAll bool | ||
| var itemsCmd = &cobra.Command{ | ||
| Use: "items USER", Short: "Active listings", Args: cobra.ExactArgs(1), |
There was a problem hiding this comment.
⚪ Low · Help uses a prohibited term
When the new help, reference text, and code comments describe Items as listings, the command help, reference text, and code comments call Items “listings,” so the new material uses terminology the repository glossary says to avoid.
Replace “listing(s)” with the glossary-approved term “Item(s)” in the changed text.
Also at internal/cli/item.go:591, docs-site/content/docs/reference/user.mdx:16, docs-site/content/docs/reference/user.mdx:22, internal/wallapop/items.go:141-142.
Prompt for AI agents
In `internal/cli/item.go` at line 590:
**Help uses a prohibited term**
When the new help, reference text, and code comments describe Items as listings, the command help, reference text, and code comments call Items “listings,” so the new material uses terminology the repository glossary says to avoid.
Replace “listing(s)” with the glossary-approved term “Item(s)” in the changed text.
Also at `internal/cli/item.go:591`, `docs-site/content/docs/reference/user.mdx:16`, `docs-site/content/docs/reference/user.mdx:22`, `internal/wallapop/items.go:141-142`.From AGENTS.md L9-11:
**Item**:
A single listing on Wallapop, identified by its 12-character hash. The numeric id in web URLs is an alias that resolves to the hash.
_Avoid_: Listing, product, ad, post- Keep next_page present as an empty string on the final user-items page. - Return a cursor-stalled error instead of reporting a repeated cursor as successful exhaustion. - Preserve and print successful pages plus the last resume cursor when a later page request fails, while still returning the request error. - Assert ordered hashes, the exact bound cursor and a successful resume. - Use Item terminology in CLI help and generated docs.
checkSeller compared the seen hashes against only the first page of the seller's items, so with more than 40 listings every check reported false item.removed events for items that had merely scrolled to a later page (and ghost recoveries when they scrolled back). - Add Client.UserItemsAll: sequential bounded walk (MaxItemWalkPages, renamed from maxOwnItemPages and now shared with MyItem) returning the pending cursor when the bound truncates the list. - checkSeller uses the walk and skips the removal sweep while the list is truncated: an absent hash may sit on an unfetched page, so staying silent beats a false alarm. `user items --all` reuses the same walk.
0bef250 to
fa953bc
Compare
|
Addressed the review finding in commit fa953bc. |
Problem
checkSellerininternal/watch/watch.gocompared the seen hashes against only the first page of the seller's items (Client.UserItems, 40 items). With sellers holding more than 40 active listings, every check emitted falseitem.removedevents for items that had merely scrolled to a later page — and ghostitem.newrecoveries when they scrolled back. The misleading comment claimed "The seller's list is complete, so a missing hash really is gone".Pre-existing bug (the real API already paginated before #55), but #55 built the tool to fix it — this stacks on top.
Changes
Client.UserItemsAll(ctx, hash, since): sequential, strictly non-concurrent bounded walk returning the pending cursor whenMaxItemWalkPages(50 pages) truncates the list.maxOwnItemPagesrenamed to exportedMaxItemWalkPages, now the single bound shared byMyItem,UserItemsAlland the CLI's--all.checkSelleruses the walk and skips the removal sweep while the list is truncated: an absent hash may sit on an unfetched page, so staying silent beats a false alarm.user items --allreuses the same walk, removing the duplicated loop.Tests
TestSellerWatchWalksAllPages: with a 2-item page size, an item on page 2 is tracked; removing page-1 and page-2 items each yields exactly one truthfulitem.removed.TestSellerWatchDoesNotReportRemovedWhenWalkTruncates: 55 items on a 1-item page — the bounded check stays silent instead of lying, and issues exactly 50 page requests per check.Summary by Sourcery
Walk seller listings across pages while suppressing removal detection when pagination cannot establish a complete view.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Review follow-up
UserItemsAllwalk preserves successful pages and the cursor if a later request fails; a repeated nonempty cursor is an explicit error with partial results/cursor preserved. The CLI prints that partial response before reporting the error.checkSellerreturns without a removal sweep on a stalled/error walk, and suppresses removal detection when the successful walk hits its page bound. This avoids declaring unfetched Items gone.Verification:
go test ./... -count=1(242 tests) andgo build ./...passed.